package com.deluxelx.soul.inn.mapper.common;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.deluxelx.soul.inn.bean.relation.FollowRelation;
import com.deluxelx.soul.inn.common.param.CollectedParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 关注、收藏、点赞等 mapper
 *
 * @author liaozihao
 * @date 2024-04-16 16:52
 */
@Mapper
public interface FollowRelationSupport extends BaseMapper<FollowRelation> {
    /**
     * 查询 userId 用户是否关注了相关东西
     *
     * @param collectedParam 前端传参
     * @return 结果
     **/
    Integer checkFollow(@Param("collectedParam") CollectedParam collectedParam);
    /**
     * 根据用户id查询我关注的内容
     *
     * @param userId 用户id
     * @return 关注相关id列表
     **/
    List<String> queryMyFollow(@Param("userId") String userId,
                               @Param("type") String type);
}
